﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace WindowsGame1.View
{
    class Fireworks
    {
        //fält
        Vector2 _position = new Vector2(0,0);
        Vector2 _velocity = new Vector2(50.0f, 0);
        Vector2 _acceleration = new Vector2(0, 9.82f);

        //konstruktor
        public Fireworks(Vector2 a_pos, Vector2 a_vel)
        {
            _position = a_pos;
            _velocity = a_vel;
        }

        //metod för att uppdatera partikelsystemet
        internal void Update(float a_elapsedTime)
        {
            _position = _position + _velocity * a_elapsedTime + _acceleration * a_elapsedTime * a_elapsedTime;
            _velocity = _velocity + _acceleration * a_elapsedTime;
        }

        //returerar ut positionen för systemet
        internal Microsoft.Xna.Framework.Vector2 GetPosition()
        {
            return _position;
        }
    }
}
